import Cookies from 'js-cookie'

const TokenKey = 'vue_admin_template_token'

export function getToken() {
  // 从Cookie中获取token
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  // 将token保存到cookie中
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  // 删除cookie中保存的token
  return Cookies.remove(TokenKey)
}

